<div class="wrap">
<div id="ajaxResponse1" class="ajaxResponse" {if $smarty.cookies.message != NULL}style="display:block"{/if}>{if $smarty.cookies.message != NULL}{$smarty.cookies.message}{/if}</div>
{if $smarty.get.subcat eq "load_sub_category"}<h2>Untermen&uuml;verwaltung{else}<h2>Obermen&uuml;verwaltung{/if} {if $smarty.get.subcat eq ""}</h2>{/if}
	{if $smarty.get.subcat eq "load_sub_category"}
    		f&uuml;r das Obermen&uuml;: {$LISTCATS.parent_name}
    	</h2> 	
    {/if}   
	<table class="widefat" cellpadding="0" cellspacing="0">
		<thead>
        <p>
        {if $smarty.get.subcat eq "load_sub_category"}
        	<a href="?{$smarty.server.QUERY_STRING}&act=newcategory"> 
            	<img src="../view/admin/images/object_create.png" alt="Create" />
            </a>
        {else}
             <a href="javascript:void()" onclick="onLimitCat('?{$smarty.server.QUERY_STRING}','?{$smarty.server.QUERY_STRING}&act=newcategory')"> 
            	<img src="../view/admin/images/object_create.png" alt="Create" />
            </a>
        {/if}    
        </p>
		<tr>
			<th class="point {if $smarty.get.by eq 'desc'}sortover{else}sortoverup{/if}" scope="col" style="text-align: center" onclick="javascript:document.location='?module=BgcmsContentManager{if $smarty.get.subcat}&subcat=load_sub_category&catid={$smarty.get.catid}{/if}&sort=cat_id&by={if $smarty.get.by eq 'desc'}asc {else}desc{/if}'">
            {TranslateTag}B_LABEL_ID{/TranslateTag}
            </th>
	        <th class="point {if $smarty.get.by eq 'desc'}sortover{else}sortoverup{/if}"  scope="col" onclick="javascript:document.location='?module=BgcmsContentManager{if $smarty.get.subcat}&subcat=load_sub_category&catid={$smarty.get.catid}{/if}&sort=cat_name&by={if $smarty.get.by eq 'desc'}asc {else}desc{/if}'">{TranslateTag}B_LABEL_NAME{/TranslateTag}</th>
        {if $SETLEFTMENU != "0"}    
            <th scope="col">Widget</th>
        {/if}    
            {if $SETBANNER != "0"}
            <th scope="col">Set Banner</th>
            {/if}
	        <th scope="col" style="text-align: center">Aktiv</th>
            <th scope="col" style="text-align: center">Standard</th>
            <th scope="col" style="text-align: center">Anordnung</th>
	        <th colspan="4" style="text-align: center">Aktionen</th>
		</tr>
		</thead>
		<tbody id="cattable">
			{foreach name=cat from=$LISTCATS.data item=item}
				<tr id="cat-{$item->cat_id}" class="{cycle values=,alternate}">
					<th scope='row' style='text-align: center' valign="middle">{$item->cat_id}</th>
					<td valign="middle">
                    	{if !$smarty.get.subcat && $item->widget_id eq '0'}
                            <a href="?module={$smarty.get.module}&amp;subcat=load_sub_category&catid={$item->cat_id}">
                                {$item->cat_name}  -->  (<b>{$item->subcat}</b> Untermen&uuml(s))
                            </a>
                        {else}
                        	 {$item->cat_name} 
                        {/if}    
                     </td>
                  {if $SETLEFTMENU != "0"}     
                     <td valign="middle">
                    	{$item->widget_name}
                     </td>
                  {/if}    
                     {if $SETBANNER != "0"}
                     <td align="center" valign="middle">
                     	{if $item->banner_path!=NULL}
                    	<img src="../view/X5/banner/{$item->banner_path}" width="150"  />
                     	{/if}
                     </td>
                     {/if}
					<td align='center'>
                    		<input name="status_{$item->cat_id}" id="status_{$item->cat_id}" type="checkbox" onclick="onSetActive('?{$smarty.server.QUERY_STRING}', '{$item->cat_id}','{$item->cat_name}',this)" {if $item->cat_is_active eq "1"}checked="checked"{/if} value="1"/>
                    </td>
                    <td align='center'>
                    	<input type="radio" name="default" value="1" {if $item->cat_id eq $LISTCATS.default_id}checked="checked" id="default_{$LISTCATS.default_id}"{/if} onclick="onSetDefault('?{$smarty.server.QUERY_STRING}', '{$item->cat_id}','{$item->cat_name}',this,'default_{$LISTCATS.default_id}')" />		
                    </td>
                    <td align='center'>
                    		<a href="?{$smarty.server.QUERY_STRING}&amp;act=position&id={$item->cat_id}"><img src="../view/admin/images/object_change.png" alt="Change" /></a>
                    </td>
					<td><a href="?{$smarty.server.QUERY_STRING}&amp;act=editcategory&id={$item->cat_id}" class='edit'><img src="../view/admin/images/object_edit.png" alt="Edit" /></a></td>
					<td><a onclick="onDeleteCat('?module={$smarty.get.module}&sub1={$smarty.get.sub1}', '{$item->cat_id}', 'cat_parent','{$smarty.get.catid}','{$item->cat_position}')" class='delete'><img src="../view/admin/images/object_delete.png" alt="Delete" /></a></td>
                    <td><a href="?{$smarty.server.QUERY_STRING}&amp;act=assign_product&id={$item->cat_id}" class='edit'>
                    		{if $item->exixts_product_list}<img src="../view/admin/images/product_edit.png" alt="product assign edit" />{else}<img src="../view/admin/images/product_assign.png" alt="product assign" />{/if} 
                                </a></td>
					<td><a href="?{$smarty.server.QUERY_STRING}&amp;act=assign_page&id={$item->cat_id}" class='edit'>
                    		{if $item->exixts}<img src="../view/admin/images/page_edit.png" alt="page edit" />{else}<img src="../view/admin/images/page_assign.png" alt="page assign" />{/if} 
                                </a></td>
				</tr>
			{/foreach}
		</tbody>
	</table>
	{if $LISTCATS.data != NULL}
    <div>			
              <div style="width:300px; float:left"> 
                  Seiten : {$LISTCATS.TOTAL} von {$LISTCATS.TOTALDATA}
              </div>			
              <div style="width:300px; text-align:right; float:right" >{$LISTCATS.FIRST} {$LISTCATS.PRE}&nbsp;{$LISTCATS.LISTPAGE} von &nbsp; {$LISTCATS.TOTALPAGE} &nbsp;                   
                  <select onchange="javascript:window.location='{$LISTCATS.LINK}&{$LISTCATS.PATHNAME}='+this.value">
                    {$LISTCATS.COMBOPAGE}                     
                  </select>&nbsp;{$LISTCATS.NEXT} {$LISTCATS.LAST}         
              </div>
              <div style="clear:both"></div>		
    </div>	     
    {/if}
    <p>
    {if $smarty.get.subcat eq "load_sub_category"}
    	<a href="?{$smarty.server.QUERY_STRING}&act=newcategory"> 
        	<img src="../view/admin/images/object_create.png" alt="Create" />
        </a>
    {else}
         <a href="javascript:void()" onclick="onLimitCat('?{$smarty.server.QUERY_STRING}','?{$smarty.server.QUERY_STRING}&act=newcategory')"> 
        	<img src="../view/admin/images/object_create.png" alt="Create" />
        </a>
    {/if} 
    </p>    
</div>

